HippoPointOverlay = function(map, center, radius, style) {

    this.areaStyle = new YMaps.Style();
    this.areaStyle.polygonStyle = new YMaps.PolygonStyle();
    this.areaStyle.polygonStyle.fill = true;
    this.areaStyle.polygonStyle.outline = true;
    this.areaStyle.polygonStyle.strokeWidth = 1;
    this.areaStyle.polygonStyle.strokeColor = "0055FFFF";
    this.areaStyle.polygonStyle.fillColor = "0055FF88";
    this.map = map;
    this.center = center;
    this.circle = null;
    this.place = new YMaps.Placemark(center, {
        style: style,
        hasBalloon: false,
        hasHint: false
    });

    map.addOverlay(this.place);
    this.setRadius(radius);
};

HippoPointOverlay.prototype.remove = function() {
    this.place.getMap().removeOverlay(this.place);
    if(this.circle !== null)
        this.circle.getMap().removeOverlay(this.circle);
};

HippoPointOverlay.prototype.setCenter = function(center) {
    this.place.setGeoPoint(center);
    if(this.circle !== null)
        this.circle.setCenter(center);
};

/**
 * @param {Number} radius
 */
HippoPointOverlay.prototype.setRadius = function(radius) {
    if(this.circle !== null) {
        if(radius === 0) {
            this.circle.getMap().removeOverlay(this.circle);
            this.circle = null;
        }
        else
            this.circle.setRadius(radius);
    } else
        this.map.addOverlay(this.circle = new Circle(this.center, radius, {}, this.areaStyle));
};

/**
 * @returns {Number}
 */
HippoPointOverlay.prototype.getRadius = function() {
    return this.circle !== null ? this.circle.getRadius() : 0;
};
